home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / allfiles / Itch / loading.dcr / 00004_BallManger Parent.ls < prev    next >
Encoding:
Text File  |  1999-03-07  |  486 b   |  33 lines

  1. property state, numsp, startSp, ballList
  2.  
  3. on new me
  4.   me.state = #setUp
  5.   numsp = 20
  6.   startSp = 60
  7.   return me
  8. end
  9.  
  10. on CheckState me
  11.   case me.state of
  12.     #default:
  13.     #setUp:
  14.       InitBalls(me)
  15.     #move:
  16.       MoveBalls(me)
  17.   end case
  18. end
  19.  
  20. on InitBalls me
  21.   ballList = []
  22.   repeat with x = startSp to startSp + numsp
  23.     add(ballList, new(script("Ball parent"), x))
  24.   end repeat
  25.   me.state = #move
  26. end
  27.  
  28. on MoveBalls me
  29.   repeat with x in ballList
  30.     MoveBall(x)
  31.   end repeat
  32. end
  33.